<include file="public:header" />
<include file="public:left" />
<form  method="post" enctype="multipart/form-data" id="brandForm">
    <input type="hidden" name="id" value="{$link.id}" />
    <section>
        <h2><strong>编辑</strong><a style="float: right" href="javascript:void(0)" onclick="history.go(-1)">返回上一页</a></h2>
        <ul class="ulColumn2">
            <li>
                <span class="item_name" style="width:120px;">标题：</span>
                <input type="text" class="textbox textbox_295" name="title" value="{$link.title}"/>
            </li>
            <li>
                <span class="item_name" style="width:120px;">图：</span>
                <input type="file" name="bnimage" class="textbox textbox_295"/>
                <input type="hidden" name="bne" class="textbox textbox_295" value="{$link.pic}"/>
                <!--规格要求：720*360-->
            </li>
            <if condition="$link.pic">
                <li>
                    <span class="item_name" style="width:120px;">图：</span>
                    <img height="100" src="__STATIC__/uploads/{$link.pic}" alt="">
                </li>
            </if>
            <li>
                <span class="item_name" style="width:120px;">状态：</span>
                <label><input type="radio" name="status" <eq name="link.status" value="1"> checked</eq> value="1"/>启用</label>
                <label><input type="radio" name="status" <neq name="link.status" value="1"> checked</neq> value="0"/>弃用</label>
            </li>
            <li>
                <span class="item_name" style="width:120px;">排序：</span>
                <input type="text" class="textbox textbox_295" name="displayorder" value="{$link.displayorder}"/>
            </li>
            <li>
                <span class="item_name" style="width:120px;">URL：</span>
                <input type="text" class="textbox textbox_295" name="url" value="{$link.url}"/> 备注：要是想直接显示详情，需要在链接后面加上 &show2=true&id=1，（id的值为列表展示的id）
            </li>
            <li style="height:auto;">
                <span class="item_name" style="width:120px;">内容：</span>
                <script id="editor" name="content" type="text/plain" style="width:700px;height:300px;margin-left:125px; margin-top:-12px;">{$link.content|htmlspecialchars_decode}</script>
            </li>
            <li>
                <span class="item_name" style="width:120px;"></span>
                <input type="button" class="link_btn" value="提交"/>
            </li>
        </ul>
    </section>
</form>
<!--tabStyle-->
<script type="text/javascript">
    $(document).ready(function(){
        //tab
        $(".admin_tab li a").click(function(){
            var liindex = $(".admin_tab li a").index(this);
            $(this).addClass("active").parent().siblings().find("a").removeClass("active");
            $(".admin_tab_cont").eq(liindex).fadeIn(150).siblings(".admin_tab_cont").hide();
        });

        $(".link_btn").click(function(){


            $("#brandForm").submit();

        });

    });
</script>

<script type="text/javascript">


    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');

    function isFocus(e) {
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }

    function setblur(e) {
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }

    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }

    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
</script>



</div>
</section>
</body>
</html>
